var events = require('events')
var emitter = new events.EventEmitter()
emitter.on('hello',function(str){console.log('hello:',str)})
emitter.addListener('hello',function(str){console.log('hello:',str)})

emitter.emit('hello','nimen.')


emitter.on('woqu',function(str){console.log('woqu:',str)})

emitter.emit('woqu','zhende1.')
emitter.emit('woqu','zhende2.')
var res = events.listenerCount(emitter,'hello')
console.log(res)
var res = events.listenerCount(emitter,'woqu')
console.log(res)